package com.sikaryofficial.canalclient.domain.doc;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.Analyzer;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.annotation.rely.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * @author : qinjinyuan
 * @desc : es 活动实体类定义
 * @date : 2023/12/25 15:19
 */
@Data
@IndexName("activity_t")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ActivityDoc implements Serializable {
    private static final long serialVersionUID = 1L;

    @IndexId(type= IdType.CUSTOMIZE)
    private Long activityId;

    /**
     * 活动名称
     */
    private String activityName;

    /**
     * 活动描述
     */
    @IndexField(fieldType = FieldType.TEXT, analyzer = Analyzer.IK_SMART, searchAnalyzer = Analyzer.IK_MAX_WORD)
    private String activityDesc;

    /**
     * 活动地址
     */
    private String imageUrl;

    /**
     * 活动开始时间
     */
    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 活动结束时间
     */
    @IndexField(fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
     * 1-purchase 抢购 2-lottery 抽奖 3-auction 竞拍
     */
    private Integer activityType;

    /**
     * 活动是否上架（生效）0-否 1-是
     */
    private Integer hasEffect;

    /**
     * 库存
     */
    private Integer stock;

    /** 地址ID */
    private Long addressId;

    /** 奖品品牌 */
    private String prizeBrand;

    /** 奖品名称 */
    private String prizeName;

    /** 奖品功能 */
    private String prizeFunction;

    /**
     * 积分个数
     */
    private Integer points;

    /**
     * 租户号
     */
    private String tenantId;

    /**
     * 乐观锁
     */
    private String revision;

    /**
     * 创建人
     */
    private Long createdBy;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 删除版本：默认为0；删除则赋值当前记录主键ID
     */
    private Long deletedVersion;
}
